// * 请求响应参数(不包含data)
export interface Result {
	code: string;
	msg: string;
}

// * 请求响应参数(包含data)
export interface ResultData<T = any> extends Result {
	data?: T;
}

// * 分页响应参数
export interface ResPage<T> {
	list: T[];
	count: number;
}

// * 分页请求参数
export interface ReqPage {
	page: number;
	size: number;
}

// * 登录
export namespace Login {
	export interface ReqLoginForm {
		username: string;
		password: string;
	}
}

// * 用户管理
export namespace User {
	export interface ReqGetUserParams extends ReqPage {
		type: number;
		keywords: string;
		status: number;
	}
	export interface UserData {
		id: number;
		last_login_ip: string;
		last_login_time: string;
		login_times: number;
		head_img: string;
		uid: number;
	}
	export interface ResUserList {
		id: string;
		username: string;
		nickname: string;
		create_ip: string;
		create_time: number;
		openid: string;
		password: string;
		status: number;
		update_time: number;
		group_id?: [];
		user_data?: UserData;
	}
}
